cmake_minimum_required(VERSION 2.8.12)
project(tcapi)

set(CMAKE_CXX_STANDARD 11)
add_definitions(-std=c++11)

if (NOT DEFINED JNI_INCLUDE_PATH)
    set(JNI_INCLUDE_PATH "C:\\Program Files\\Java\\jdk-1.8\\include")
endif ()

if (NOT DEFINED JNI_INCLUDE_PATH2)
    set(JNI_INCLUDE_PATH2 "${JNI_INCLUDE_PATH}/win32")
endif ()

if (NOT DEFINED MINGW_INCLUDE)
    set(MINGW_INCLUDE "D:\\x86_64-8.1.0-release-posix-seh-rt_v6-rev0\\mingw64\\x86_64-w64-mingw32\\include")
endif ()

include_directories(${JNI_INCLUDE_PATH} ${JNI_INCLUDE_PATH2} ${MINGW_INCLUDE})

add_library(tcapi SHARED main.cpp transcoder.h
        errno_tcapi.h
        com_arcvideo_system_sdk_PicTranscoder.h
        jni_util.cpp
        jni_util.h
        pictranscoderapi.cpp
        pictranscoderapi.h)

target_link_libraries(tcapi dl pthread)
